package com.amit.hibernate2;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab2Client2 {

	public static void main(String[] args) {
		
		SessionFactory sessionfactory=CHibernateUtil.getfactory();
		Session session=sessionfactory.openSession();
		Transaction tx=session.beginTransaction();
		
		Anant cust=(Anant) session.get(Anant.class,2);
		System.out.println(cust.getCid()+" "+cust.getCity()+" "+cust.getEmail());
		
		
		tx.commit();
		session.close();
		
		

	}

}
